package com.dibang.app.operation.provider;

import com.dibang.app.mvp.abs.AbsProvider;
import com.dibang.app.mvp.abs.BeanFactory;
import com.dibang.app.operation.model.abs.MainModel;
import com.dibang.app.operation.model.impl.MainModelImpl;
import com.dibang.app.operation.presenter.abs.MainPresenter;
import com.dibang.app.operation.presenter.impl.MainPresenterImpl;
import com.dibang.app.operation.view.abs.MainView;
import com.dibang.app.operation.view.impl.MainViewImpl;

/**
 * Created by wxl on 2019/7/24.
 */

public class MainProImpl extends AbsProvider<MainView,MainPresenter,MainModel> {
    @Override
    public MainView getView() {
        return BeanFactory.getInstance(MainViewImpl.class);
    }

    @Override
    public MainPresenter getPresenter() {
        return BeanFactory.getInstance(MainPresenterImpl.class);
    }

    @Override
    public MainModel getModel() {
        return BeanFactory.getInstance(MainModelImpl.class);
    }

    @Override
    public void onDestroy() {
        BeanFactory.remove(MainViewImpl.class,MainPresenterImpl.class,MainModelImpl.class);
    }
}
